<%@ page import="java.util.List" %>
<%@ page import="com.xwd.pojo.Emp" %><%--
  Created by IntelliJ IDEA.
  User: 13241
  Date: 2022/2/7
  Time: 20:07
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Emp-Infomation</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        .infotable {
            margin: 0px auto;
            border: 2px solid skyblue;
            width: 80%;
        }

        tr,
        td {
            border: 1px solid black;
        }
        td {
            text-align: center;
        }

        tr:first-child {
            font-weight: 700;
        }
    </style>
</head>
<body>
<table class="infotable" cellspacing="0px" cellpadding="0px">
    <tr>
        <td>编号</td>
        <td>姓名</td>
        <td>上级编号</td>
        <td>职务</td>
        <td>入职日期</td>
        <td>薪资</td>
        <td>补助</td>
        <td>部门号</td>
        <td>薪资等级</td>
    </tr>
    <%
        //从request内置对象读取参数信息
        List<Emp> emps = (List<Emp>)(request.getAttribute("emps"));
        int size = emps.size();
    %>
    <%
        for (int i = 0; i < size; i++) {
            Emp emp = emps.get(i);
    %>
        <tr>
            <td><%=emp.getEmpno()%></td>
            <td><%=emp.getEname()%></td>
            <td><%=emp.getMgr()%></td>
            <td><%=emp.getJob()%></td>
            <td><%=emp.getHiredate()%></td>
            <td><%=emp.getSal()%></td>
            <td><%=emp.getComm()%></td>
            <td><%=emp.getDeptno()%></td>
            <td><%=emp.getGrade()%></td>
        </tr>
    <%}%>
</table>

</body>
</html>
